package com.nnnu.orange.pojo.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Pattern;

@Data
public class UserQueryDto {

    private String username;

    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确，必须是以1开头的11位数字")
    private String phone;
    @Range(min = 1, max = 2, message = "gender 只能为 1 或 2")
    private Integer gender;

    @Range(min = 0, max = 1, message = "membershipType 只能为 0 或 1")
    private Integer membershipType;

    private Integer pageNum = 1, pageSize = 1000;


}
